<%@ page import="org.bjou.ShiroUser" %>
<!doctype html>
<html>
	<head>
		<meta name="layout" content="pertho">
		<g:set var="entityName" value="${message(code: 'shiroUser.label', default: 'ShiroUser')}" />
		<title><g:message code="default.list.label" args="[entityName]" /></title>
	</head>
	<body>
		 <div class="container">
    <div class="row">
      <div class="twelve columns">
        <!-- 查询条件开始 -->
          <div class="box_c">
          <div class="box_c_heading cf box_actions">
            <p>查询条件</p>
          </div>
          <div class="box_c_content">
            <g:form  action="list" method="post">
             <div class="formRow">
              姓名：
              <input type="text" id='fullname' name='fullname' value="${params.fullname}"/>
              角色：
               <g:select id="userRole" name="roleId" from="${org.bjou.ShiroRole.list()}" 
                          optionKey="id" optionValue="name" 
                          value="${params.roleId}" 
                          class="many-to-one" noSelection="['': '请选择']"/> 
              
              所属系部：
               <g:select id="userGroup" name="groupId" from="${org.bjou.UserGroup.list()}" 
                          optionKey="id" optionValue="groupName" 
                          value="${params.groupId}" 
                          class="many-to-one" noSelection="['': '请选择']"/> 
              <input class="gh_button save" type="submit" value="查询"></input>
              </div>
            </g:form>
          </div>
          </div>
         <!-- 查询条件结束 --> 
        <div class="box_c">

          <div class="box_c_heading cf">
            <p><g:message code="default.list.label" args="[entityName]" /></p>
          </div>
          <div class="box_c_content">
            
            
		<div id="list-shiroUser" class="content scaffold-list" role="main">
			<g:if test="${flash.message}">
			<div class="message" role="status">${flash.message}</div>
			</g:if>
			<table>
				<thead>
					<tr>
					
						
					
						<g:sortableColumn property="username" title="登录名" />
                                                
                                                <g:sortableColumn property="fullname" title="姓名" />
                                                
                                                <g:sortableColumn property="groupName" title="所属系部" />
                                                
                                                 <g:sortableColumn property="fullname" title="对应角色" />
                                                 
                                                  <g:sortableColumn property="action" title="操作" />
					
					</tr>
				</thead>
				<tbody>
				<g:each in="${shiroUserInstanceList}" status="i" var="shiroUserInstance">
					<tr class="${(i % 2) == 0 ? 'even' : 'odd'}">
					
						<td><g:link action="show" id="${shiroUserInstance.id}">${shiroUserInstance.username} </g:link></td>
					
						<td>${shiroUserInstance.fullname}</td>
                                                
                                                <td>${shiroUserInstance.groupname}</td>
                                                
                                                <td>${shiroUserInstance.rolename}</td>
                                                
                                                  <td><g:link action="init" id="${shiroUserInstance.id}" onclick="return confirm('确定要初始化密码?');">初始化密码</g:link></td>
					
					</tr>
				</g:each>
				</tbody>
			</table>
			<div class="pagination">
				<g:paginate total="${shiroUserInstanceTotal}" />
			</div>
                  <g:form method="post" >
                <fieldset class="buttons">
                  <g:actionSubmit class="gh_button" action="create" value="新建" />
                </fieldset>
              </g:form>
		</div>
          </div>
        </div>
      </div>
    </div>
	</body>
</html>
